home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_361 / xcolor-lib / demo_sources / demo_i.s < prev    next >
Text File  |  1992-05-06  |  3KB  |  90 lines

  1.  
  2. ;   ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  3. ;   ­­                                                                ­­
  4. ;   ­­                    DEMO I - XColor library                     ­­
  5. ;   ­­                                                                ­­
  6. ;   ­­                                                                ­­
  7. ;   ­­                     by Roger Fischlin                          ­­
  8. ;   ­­                        Steigerwaldweg 6                        ­­
  9. ;   ­­                        6450 Hanau 7                            ­­
  10. ;   ­­                        West Germany                            ­­
  11. ;   ­­                                                                ­­
  12. ;   ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  13. ;   ­­    To run this demo the xcolor library must be available !     ­­
  14. ;   ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  15.  
  16.  
  17.  
  18.  
  19.     incdir    "fh1:include/"            ; path may be different
  20.     include    "exec/exec_lib.i"
  21.     include    "intuition/intuitionbase.i"
  22.     include    "intuition/intuition.i"
  23.     include    "intuition/intuition_lib.i"
  24.  
  25.  
  26.  
  27.     include    "fh1:Color/XColor.i"
  28.  
  29.  
  30.  
  31.  
  32.     include    "misc/easystart.i"        ; I love the Workbench !
  33.  
  34.  
  35.  
  36.     move.l    #XC_VERSION,d0        ; open library
  37.     lea.l    XColorName(pc),a1
  38.     CALLEXEC    OpenLibrary
  39.     tst.l    d0
  40.     beq    NoLibrary
  41.     move.l    d0,_XColorBase
  42.  
  43.     move.l    d0,a0        ; XColor has already opened
  44.     move.l    XCb_IntuitionBase(a0),a0    ; the Intuition-Library - so why should I
  45.     move.l    ib_ActiveScreen(a0),d0    ; it a second time ????                    
  46.  
  47.  
  48.     lea.l    Palette(pc),a0        ; put up ColorRequester structure
  49.     move.l    d0,CR_Screen(a0)    ; ^screen
  50.     move.b    #0,CR_TextColour(a0)    ; pens
  51.     move.b    #1,CR_BackColour(a0)
  52.     move.b    #2,CR_GBorderColour(a0)
  53.     move.b    #0,CR_GTextColour(a0)
  54.     move.w    #10,CR_LeftEdge(a0)    ; X,Y
  55.     move.w    #10,CR_TopEdge(a0)
  56.     move.l    #4,CR_DefaultEntries(a0)    ; default workbench palette
  57.     move.l    #DefaultPalette,CR_DefaultColourMap(a0)
  58.     move.l    #ScreenTitle,CR_ScreenTitle(a0)    ; screen title        
  59.     move.l    #WindowTitle,CR_DefaultWTitle(a0)    ; defalut window title        
  60.  
  61.     clr.l    CR_JMPWindow(a0)    ; no user interface
  62.     clr.l    CR_JMPDraw(a0)
  63.     clr.l    CR_JMPMode(a0)
  64.     clr.l    CR_JMPMessage(a0)
  65.     clr.l    CR_Font(a0)        ; use default font (should be 8x8)
  66.     move.l    #FLAG_NORMAL!FLAG_RGB,CR_Flags(a0)    ; don't use hex, but use HSV instead of RGB
  67.  
  68.  
  69.     CALLXCOLOR    ColourRequester
  70.  
  71.     move.l    _XColorBase,a1        ; close library
  72.     CALLEXEC    CloseLibrary
  73. NoLibrary    moveq.l    #0,d0
  74.     rts
  75.  
  76. XColorName    XCOLORNAME
  77. _XColorBase    dc.l    0
  78.  
  79.  
  80. Palette    ds.b    CR_SIZEOF
  81.     even
  82. DefaultPalette    dc.w    $05a,$fff,$000,$f80
  83.     even
  84. ScreenTitle    dc.b    "DEMO - XCOLOR LIBRARY BY ROGER FISCHLIN",0
  85.     even
  86. WindowTitle    dc.b    "Palette                           ",0
  87.     even
  88.  
  89.  
  90.